package com.gcspring.h2db.controller;

import com.gcspring.h2db.config.ApeConfig;
import com.gcspring.h2db.config.Server1400Config;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.net.URLEncoder;

/**
 * @Author: guc
 * @Description:
 * @Date: 2022-9-1 10:12
 * @Version: 1.0
 */
@RestController
@Api(value = "配置中心", tags = {"配置中心"})
@RequestMapping("config")
public class ConfigController {
    @Autowired
    private Server1400Config server1400Config;
    @Autowired
    private ApeConfig apeConfig;

    @GetMapping("/cfg-1400")
    @ApiOperation("获取配置的1400平台信息")
    public Server1400Config get1400Config() {
        return server1400Config;
    }

    @GetMapping("/cfg-ape")
    @ApiOperation("获取配置的APE ID信息")
    public ApeConfig getApeConfig() {
        return apeConfig;
    }
}
